$(function () {
    $("body").on('click',".details-info-box",function () {
        var _this = $(this);
        var id = _this.data('id');
        var status = _this.data('status');

        var type = _this.data("type");
        var message = '';
        if(type==1){
            message = '查看销售记录详情';
        }else if(type==2){
            message='查看退费记录详情';
        }
        parent.layer.open({
            area: winArea,
            btn: ['关闭'],
            content: baseloaction + "/admin/order/details/findOrderDetailsInfo?id=" + id,
            shade: [0.3, '#000'],
            shadeClose: false,
            title: message,
            type: 2,
            yes: function (index) {
                parent.layer.close(index);
            }
        });
    })/*.on('click','.order-status-box',function () {
        var _this = $(this);
        var id = _this.data('id');
        var status = _this.data('status');
        if(status=='DELAY'){
            parent.layer.open({
                area: ['620px','420px'],
                btn: ['确定','关闭'],
                content: baseloaction + "/admin/order/details/ajaxDelayDetails?id=" + id,
                shade: [0.3, '#000'],
                shadeClose: false,
                title: '延期课程',
                type: 2,
                yes: function (index) {
                    var validTime = parent.layer.getChildFrame('body', index).find('#validTime').val();
                    var recordKey = parent.layer.getChildFrame('body', index).find('#recordKey').val();
                    $.ajax({
                        url:baseloaction + '/admin/order/details/ajax/updateCourseBuyRecordValidTime',
                        type:'post',
                        dataType:'json',
                        data:{'recordKey':recordKey,'validTime':validTime},
                        async:false,
                        success:function (result) {
                            if(result.success==true){
                                icModale(0, result.message);
                            }else{
                                icModale(0, result.message);
                            }
                        },
                        error:function (error) {
                            icModale(0, "系统错误，延期课程有效期失败");
                        }
                    });
                    parent.layer.close(index);
                }
            });
        }
    })*/;
});